<script src="js/admin/dictionary.js"></script>
<script src="js/admin/dictionaryDetail.js"></script>
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 10px;">
    <legend>字典管理</legend>
</fieldset>
<div class="layui-row layui-col-space10">
    <div class="layui-col-md5">
        <fieldset class="layui-elem-field layui-field-title" style="margin-top: 10px;">
            <legend>字典类型</legend>
        </fieldset>
        <form id="searchForm" class="layui-form">
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">类型名称</label>
                    <div class="layui-input-inline" style="width: 120px;">
                        <input type="text" name="hsdtName" placeholder="请输入类型名称"
                               autocomplete="off"
                               class="layui-input">
                    </div>
                    <button class="layui-btn layui-btn-radius layui-btn-normal" lay-submit lay-filter="typeSearch"
                            style="margin-left: 15px;"
                    >查询
                    </button>
                </div>
            </div>
        </form>
        <table id="typeTable" lay-filter="typeTable"></table>
        <div id="typeTableToolBar" style="display: none;">
            <div class="layui-inline" lay-event="add" title="新增"><i class="layui-icon layui-icon-add-1"></i></div>
        </div>
        <div id="typeTableItemToolBar" style="display: none;">
            <a class="layui-icon" href="javascript:void(0);" style="font-size: 20px;" lay-event="edit" title="编辑">&#xe642;</a>
            &nbsp;&nbsp;
            <a class="layui-icon" href="javascript:void(0);" style="font-size: 20px;" lay-event="remove" title="删除">&#xe640;</a>
            &nbsp;&nbsp;
        </div>
    </div>
    <div class="layui-col-md7">
        <fieldset class="layui-elem-field layui-field-title" style="margin-top: 10px;">
            <legend>字典明细</legend>
        </fieldset>
        <form id="searchDetailForm" class="layui-form">
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">明细名称</label>
                    <div class="layui-input-inline" style="width: 120px;">
                        <input id="searchHsddName" type="text" name="hsddName" placeholder="请输入明细名称"
                               autocomplete="off"
                               class="layui-input">
                    </div>
                    <button class="layui-btn layui-btn-radius layui-btn-normal" lay-submit lay-filter="detailSearch"
                            style="margin-left: 15px;"
                    >查询
                    </button>
                </div>
            </div>
        </form>
        <table id="detailTable" lay-filter="detailTable"></table>
        <div id="detailTableToolBar" style="display: none;">
            <div class="layui-inline" lay-event="add" title="新增"><i class="layui-icon layui-icon-add-1"></i></div>
        </div>
        <div id="detailTableItemToolBar" style="display: none;">
            <a class="layui-icon" href="javascript:void(0);" style="font-size: 20px;" lay-event="edit" title="编辑">&#xe642;</a>
            &nbsp;&nbsp;
            <a class="layui-icon" href="javascript:void(0);" style="font-size: 20px;" lay-event="remove" title="删除">&#xe640;</a>
            &nbsp;&nbsp;
        </div>
    </div>
</div>
<div id="popLayer" style="display: none;">
    <div id="dictionaryTypeDiv" class="popLayer" style="display: none;">
        <form id="dictionaryTypeForm" class="layui-form" lay-filter="dictionaryTypeForm"
              style="width: 400px;margin-top: 30px;">
            <input type="hidden" name="hsdtId"/>
            <div class="layui-form-item">
                <label class="layui-form-label">类型名称</label>
                <div class="layui-input-block">
                    <input type="text" name="hsdtName" required lay-verify="required" placeholder="请输入类型名称"
                           autocomplete="off"
                           class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">类型分类</label>
                <div class="layui-input-block">
                    <select name="hsdtType" lay-verify="required">
                        <option value=""></option>
                        <option value="1">列表</option>
                        <option value="2">树</option>
                    </select>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">排序号</label>
                <div class="layui-input-block">
                    <input type="text" name="sortNum" required lay-verify="required|number" placeholder="请输入排序号"
                           autocomplete="off"
                           class="layui-input">
                </div>
            </div>

            <div class="layui-form-item">
                <div class="layui-input-block" style="text-align: right">
                    <button class="layui-btn layui-btn-normal" lay-submit lay-filter="dictionaryTypeSave">确认</button>
                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                </div>
            </div>
        </form>
    </div>

    <div id="dictionaryDetailDiv" class="popLayer" style="display: none;">
        <form id="dictionaryDetailForm" class="layui-form" lay-filter="dictionaryDetailForm"
              style="width: 400px;margin-top: 30px;">
            <input type="hidden" name="hsddId"/>
            <input type="hidden" name="hsdtId"/>
            <input type="hidden" name="parentId"/>
            <div class="layui-form-item">
                <label class="layui-form-label">明细名称</label>
                <div class="layui-input-block">
                    <input type="text" name="hsddName" required lay-verify="required" placeholder="请输入明细名称"
                           autocomplete="off"
                           class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">明细数值</label>
                <div class="layui-input-block">
                    <input type="text" name="intValue" lay-verify="number" placeholder="请输入明细数值"
                           autocomplete="off"
                           class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">明细字符值</label>
                <div class="layui-input-block">
                    <input type="text" name="strValue" placeholder="明细字符值"
                           autocomplete="off"
                           class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">排序号</label>
                <div class="layui-input-block">
                    <input type="text" name="sortNum" required lay-verify="required|number" placeholder="请输入排序号"
                           autocomplete="off"
                           class="layui-input">
                </div>
            </div>

            <div class="layui-form-item">
                <div class="layui-input-block" style="text-align: right">
                    <button class="layui-btn layui-btn-normal" lay-submit lay-filter="dictionaryDetailSave">确认</button>
                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                </div>
            </div>
        </form>
    </div>
</div>